package com.meida.module.file.provider.service;

import com.meida.common.mybatis.base.service.IBaseService;
import com.meida.common.mybatis.entity.EntityMap;
import com.meida.common.mybatis.model.ResultBody;
import com.meida.module.file.client.entity.SysFile;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * 文件表 服务类
 *
 * @author flyme
 * @date 2019-06-03
 */
public interface SysFileService extends IBaseService<SysFile> {
    /**
     * 获取文件
     *
     * @param busId
     * @param busType
     * @return
     */
    ResultBody getFileList(Long busId, String busType);

    /**
     * 获取文件
     *
     * @param busId
     * @param cls
     * @return
     */
    List<EntityMap> selectFileList(Long busId, Class cls);

    List<EntityMap> selectDeleteFileList(Long[] fileIds, Long busId, String busType);

    /**
     * 为files设置busId和busType
     *
     * @param busId
     * @param busType
     * @param fileIds
     * @return
     */
    boolean setBusIdAndBusType(Long busId, String busType, String fileIds);

    Map<String, Object> upload(MultipartFile file, Long busId, String busType, String base64Img);


}
